package com.hrbxlh.dao;

import java.io.IOException;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

@Repository
public interface QuestionDao {
	
	/**
	 * @description 题库列表
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String,Object>> getAllQuestionList(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * 添加问题。
	 * @throws IOException
	 */
	public boolean addQuestion(List<Map<String,Object>> list) throws Exception;
	
	/**
	 * 编辑问题。
	 * @throws IOException
	 */
	public boolean saveQuestion(Map<String,Object> paramMap) throws Exception;
	
	/**
	 * @description 删除题库
	 * @param List<Integer> 题库id的集合
	 * @return 
	 * @throws Exception
	 */
	public boolean delQuestions(List<String> paramList) throws Exception;
	
	/**
	 * @description 题库选择excel
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String,Object>> getOptionQuestionListExcel(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 题库判断excel
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String,Object>> getJudgeQuestionListExcel(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 题库填空excel
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String,Object>> getBlanksQuestionListExcel(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 题库简答excel
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String,Object>> getAnswerQuestionListExcel(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * 在线预览表单提交。
	 * @throws IOException
	 */
	public boolean addOnlineQuestion(Map<String,Object> paramMap) throws Exception;
	
	/**
	 * 在线预览表单提交(修改)。
	 * @throws IOException
	 */
	public boolean updateOnlineQuestion(Map<String,Object> paramMap) throws Exception;
	
	/**
	 * @description 通过学号和课程号获取此学生所属老师，查出当前科目当前老师生成的试题
	 * @return 
	 * @throws Exception
	 */
	public Map<String,Object> getOnlineQuestion(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * 学生在线考试表单提交
	 * @throws IOException
	 */
	public boolean addStuAnswerQuestion(Map<String,Object> paramMap) throws Exception;
	
	/**
	 * 学生在线考试表单提交(修改)
	 * @throws IOException
	 */
	public boolean updateStuAnswerQuestion(Map<String,Object> paramMap) throws Exception;
	
	/**
	 * @description 通过问题主键查询question表查每道题的答案
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String,Object>> getAllQuestionListById(List<Map<String,Object>> list) throws Exception;
	
	/**
	 * @description 该教师的当前所属的所有班级学生考试情况
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String,Object>> getAllStuExamList(Map<String,Object> map) throws Exception;
	
	/**
	 * @description 通过课程id和学号查询当前课程的试题
	 * @return 
	 * @throws Exception
	 */
	public Map<String,Object> getMarkStuQuestion(Map<String,Object> map) throws Exception;
	
	/**
	 * 编辑成绩表，将学生总成绩插入数据库。
	 * @throws IOException
	 */
	public boolean saveQuestionByStuId(Map<String,Object> paramMap) throws Exception;
	
	/**
	 * 编辑学生在线考试表，将填空、简答的错误数量和分数插入数据库。
	 * @throws IOException
	 */
	public boolean addExameSource(Map<String,Object> paramMap) throws Exception;
	
	/**
	 * @description 通过学号和试卷主键查询当前学生是否已经答过题
	 * @return 
	 * @throws Exception
	 */
	public Map<String,Object> getStuAnswerByOnIdAndCouId(Map<String, Object> paramMap) throws Exception;
	
	
	

}
